<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("components4phpfull/jtsitetheme.inc.php");
use_unit("components4phpfull/jtjavascript.inc.php");
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class trouble_delete extends Page
{
       public $hiddenId = null;


       function trouble_deleteCreate($sender, $params)
       {
       $id = $_GET['autoid'];
       $this->hiddenId->setValue($id);

       $result = mysql_query("delete from veh_trouble_tbl where autoid='".$this->hiddenId->getValue()."'");
       if($_GET['frame']=='1')
       {
       redirect('veh_trouble_list_frame.php');
       }
       else
       redirect('trouble_workorder_list.php');
       }

}

global $application;

global $trouble_delete;

//Creates the form
$trouble_delete=new trouble_delete($application);

//Read from resource file
$trouble_delete->loadResource(__FILE__);

//Shows the form
$trouble_delete->show();

?>